<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
require_once 'config/config.php';;
$conettion = mysql_connect(DB_HOST . ":" . DB_PORT, DB_USER, DB_PASS)or die(mysql_error());
mysql_select_db(DB_NAME, $conettion);

function getData($query){
    global $conettion;
    $pages =array();
    $data= mysql_query($query,$conettion);
    while($row= mysql_fetch_assoc($data)){
        $pages[]=$row;
    }
    return $pages;
}